﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mfVehicleSearch.aspx.cs"
    Inherits="msBsc.WebUi.mMall.Public.mfVehicleSearch" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="/themes/mStyle1/css/home/base.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" media="all" href="/themes/mStyle1/css/home/waplist.css" />
    <link rel="stylesheet" type="text/css" media="all" href="/themes/mStyle1/css/home/reset.css" />
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/mGlobal.css" charset="gbk" />
    <title>地接客旅游游包车服务价格 - 地接客手机版</title>
    <%=getMeta()%>
    <%=getBodyBeforeJs()%>
    <script src="/??jqPlugin/js/jquery-1.8.3.min.js,js/jBase.js,js/jmPage.js,themes/Style1/jsQt.js,jqPlugin/js/laytpl.js,themes/wStyle1/js/comm/VerifyJs.js"
        type="text/javascript"></script>
    <style type="text/css">
        body {
            margin: 0;
            padding: 0;
        }
    </style>
</head>
<body>
    <div class="viewport">
        <div class="head">
            <a class="head_left" id="webgoback" onclick="GoHistoryUrl();"><i class="left_ico"></i></a>
            <p><span class="city_name"></span>包车选择（<span id="PageCount">0</span>条）</p>
            <a class="head_right" href="tel:4006507936">
                <i class="phone_ico"></i>
            </a>
        </div>
        <input type="hidden" id="countryId" value="DF6723BE-A25C-4F77-BB49-A1662D3E6F2A" />
        <input type="hidden" id="cityId" value="AEF39D8E-D298-4AF1-AEC5-2B00D237F5F5" />
        <input type="hidden" id="destionId" value="" />
        <input type="hidden" id="pageIndex" value="1" />
        <div class="main">
            <div class="list_nav">
                <ul class="clearfix">
                    <li><span class="nav_span">
                        <span id="countryName" class="city_name">中国</span>
                        <dfn class="sjia sjia_bom"></dfn>
                    </span>
                        <select id="country_select">
                        </select>
                    </li>
                    <li>
                        <span class="nav_span">
                            <span id="cityName">北京</span>
                            <dfn class="sjia sjia_bom"></dfn>
                        </span>
                        <select id="city_select">
                        </select>
                    </li>
                    <li>
                        <span class="nav_span">
                            <span class="city_name" id="destionName">全部</span>
                            <dfn class="sjia sjia_bom"></dfn>
                        </span>
                        <select id="destion_select">
                        </select>
                    </li>
                </ul>
            </div>
            <!--carlist-->
            <div class="carlist">
                <div class="listcon" id="CarList">
                </div>
                <xmp id="car_list_temp" style="display: none;">
            {{#for(var i=0,len=d.rows.length;i < len;i++){ }}
                    <dl onclick="window.location.href='/car/16364.html'">
                        <dt><a href="http://m.jryghq.com/car/16364.html">
                            <img alt="{{d.rows[i].VEHICLE_NAME}}" src="http://www.dijieke.com/{{d.rows[i].VEHICLE_DEFAULT_PIC}}" /></a>
                        </dt>
                        <dd>
                            <h3><a href="http://m.jryghq.com/car/16364.html">{{d.rows[i].VEHICLE_NAME}}</a></h3>
                            <p><span class="span_l">{{d.rows[i].VEHICLE_BRAND_NAME}} |</span>{{d.rows[i].VEHICLE_SEATS}}座</p>
                            <p><span class="span_l">服务类型:</span>{{d.rows[i].VEHICLE_SERVICE_TYPE_NAME}}</p>
                        </dd>
                        <dd class="wrap_price">
                            <div class="price">
                                ￥<span>{{getNumber(d.rows[i].VEHICLE_PRICE_DAY)}}</span><em>/天</em><br>
                            </div>
                        </dd>
                    </dl>
            {{#} }}
            </xmp>
                <div style="display: none;" id="xLoading" class="xLoading">正在加载中...</div>
                <div id="Div1" class="pager">
                    <a id="pageNextText" title="查询更多" href="javascript:nextPage();">查询更多</a>
                </div>
            </div>
        </div>
        <%=msBsc.WebUi.Code.QtHtmlGet.GetWapMenuHtml() %>
    </div>

    <script type="text/javascript">
        (function () {
            $("#countryId").val(GetQueryStr("countryId"));
            $("#cityId").val(GetQueryStr("cityId"));
            $("#destionId").val(GetQueryStr("destionId"));
            $("#pageIndex").val(GetQueryStr("pIndex"));
            //得到参数
            var countryId = $("#countryId").val();
            var cityId = $("#cityId").val();
            var destionId = $("#destionId").val();
            var pageIndex = $("#pageIndex").val();


            $("#country_select").change(function () {
                window.location.href = "/mp_VehicleSearch.htm?countryId=" + $(this).val() + "&cityId=&destionId=&pIndex=1";
            });
            $("#city_select").change(function () {
                window.location.href = "/mp_VehicleSearch.htm?countryId=" + countryId + "&cityId=" + $(this).val() + "&destionId=&pIndex=1";
            });
            $("#destion_select").change(function () {
                window.location.href = "/mp_VehicleSearch.htm?countryId=" + countryId + "&cityId=" + cityId + "&destionId=" + $(this).val() + "&pIndex=1";
            });


        })()

        function doInit() {
            var _jsParam = new jsonRow();
            _jsParam.AddCell("parentsId", "00000000-0000-0000-0000-000000000000");
            _jsParam.AddCell("pIndex", '1');
            _jsParam.AddCell("isAll", "true");
            _jsParam.AddCell("destionId", $("#destionId").val());
            _jsParam.AddCell("cityId", $("#cityId").val());
            _jsParam.AddCell("countryId", $("#countryId").val());
            _jsParam.AddCell("ACTION", "init");
            ajaxComm(_jsParam);
        }
        doInit();

        function setCity(data, selectId, selectCity) {
            if (IsNull(data) || data.rows.length < 1) {
                return;
            }
            $("#" + selectId).html("");
            var cityName = "";
            for (var i = 0; i < data.rows.length; i++) {
                if (data.rows[i].COUNTRY_CITY_ID == selectCity) {
                    $("#" + selectId).append("<option selected='selected' value='" + data.rows[i].COUNTRY_CITY_ID + "'>" + data.rows[i].COUNTRY_CITY_NME + "</option>");
                    cityName = data.rows[i].COUNTRY_CITY_NME;
                } else {
                    $("#" + selectId).append("<option value='" + data.rows[i].COUNTRY_CITY_ID + "'>" + data.rows[i].COUNTRY_CITY_NME + "</option>");
                }
            }
            if (IsNull(cityName)) {
                cityName = data.rows[0].COUNTRY_CITY_NME;
            }
            $("#" + selectId).prev("span").children().eq(0).text(cityName);
        }
        function nextPage() {
            //判断是否加载完
            var pageIndex = parseInt($("#pageIndex").val());
            var pageCount = parseInt($('#PageCount').html());
            if (pageIndex > 0 && pageCount > 0) {
                pageIndex = parseInt(pageIndex);

                $("#pageIndex").val((pageIndex + 1));

                if ((pageCount / (pageIndex * 15)) < (pageIndex + 1) && (pageCount / (pageIndex * 15)) < pageIndex) {
                    $("#xLoading").show();
                    $("#xLoading").html("下面没更多的内容了.....");
                    $("#Div1").hide();
                    return;
                }
            }
            else {
                $("#pageIndex").val((pageIndex = 1));
            }

            $("#xLoading").show();
            $("#Div1").hide();
            var _jsParam = new jsonRow();
            _jsParam.AddCell("parentsId", "00000000-0000-0000-0000-000000000000");
            _jsParam.AddCell("pIndex", parseInt(pageIndex) + 1);
            _jsParam.AddCell("destionId", $("#destionId").val());
            _jsParam.AddCell("cityId", $("#cityId").val());
            _jsParam.AddCell("countryId", $("#countryId").val());
            _jsParam.AddCell("ACTION", "NextPage");
            ajaxComm(_jsParam);
        }
    </script>
    <%=getBodyAfterJs() %>
</body>
</html>
